The present invention relates to method and apparatus for controlling a robot arm with multi-degrees of freedom (hereinafter simply referred to as a robot), and more particularly to method and apparatus for controlling the robot to precisely and smoothly move an end of a robot arm with redundant degrees of freedom (hereinafter simply referred to as a redundant arm) along a desired trajectory.
In a trajectory control method to control the robot, a trajectory to which the end of the robot is to follow is appropriately interpolated and respective points on the trajectory defined by the interpolation are used as desired points, which are sequentially selected at a predetermined time interval to sequentially control the end of the robot along the desired trajectory. In order to position the end of the robot at the selected desired point, it is necessary to synergistically actuate joints of the robot. As the synergistic control method for the joints of the robot, the following method has been well known.
Let us consider a robot with 3-degrees of freedom which is commonly used to position the end of the robot at any position in a given space.
A position of the end of the robot in the working space represented by an orthogonal coordinate and at joint angle of the robot represented by a coordinate inherent to the robot are expressed by: EQU =(x y z).sup.T ( 1) EQU =(.theta..sub.1 .theta..sub.2 .theta..sub.3).sup.T ( 2)
where the superscript T indicates the transpose of the row vector into a column vector.
From a geometrical structure of the robot, the robot end position is expressed by the joint angle as EQU =F( ) (3)
Namely, the following relations exist. ##EQU1## where EQU =(f.sub.1 f.sub.2 f.sub.3) (5)
The transformation from the joint angle represented by the coordinate inherent to the robot to the end position in the spatial coordinate is called a coordinate transformation.
By solving the simultaneous equations (4) for .theta..sub.1, .theta..sub.2 and .theta..sub.3, the joint angle for attaining the robot end position is determined.
That is, by solving the equations (4) for , we get EQU =G( ) (6)
that is, ##EQU2## where EQU G=(g.sub.1 g.sub.2 g.sub.3) (8)
The transformation G from the robot end position represented by the spatial coordinate to the joint angle in the coordinate inherent to the robot is called an inverse coordinate transformation.
The method for positioning the robot end position to the desired position by determining the joint angles by the inverse coordinate transform equation (6) and controlling the joints of the robot to follow the angle is a most commonly known method.
In this control method, however, when the number of joints of the robot is larger than three, that is, when redudant joints are included, the coordinate transform function is represented as EQU x=f.sub.1 (.theta..sub.1, .theta..sub.2, .theta..sub.3, .theta..sub.4, . . . , .theta..sub.n) EQU y=f.sub.2 (.theta..sub.1, .theta..sub.2, .theta..sub.3, .theta..sub.4, . . . , .theta..sub.n) EQU z=f.sub.3 (.theta..sub.1, .theta..sub.2, .theta..sub.3, .theta..sub.4, . . . , .theta..sub.n) (9)
where n is the number of joints. Since the number of unknown quantities is n (n.gtoreq.4) while the number of equations is three, the joint angle is not uniquely defined for the robot end position . In order to resolve the above problem, n-3 of the n joints may be fixed and the simultaneous equations (9) may be solved for the three joints to determine the joint angles of the robot. In this method, in order to determine which joints should be fixed and which joints should be operated to position the robot end to the desired position, an operation time required for positioning and a power consumed etc., are used as an evaluation function, and a combination of joints which minimizes the evaluation function is determined. This evaluation function is usually complex, and non-linear simultaneous equations including trigonometrical functions must be solved to determine the inverse coordinate transform function for each set of joints to be fixed. Accordingly, the calculation is very complex.
Further, it is a common method in prior art to obtain a specified robot end velocity from joint velocities of the robot by inverse-coordinate transforming the relation between the velocity of the robot end and the joint velocities, which relation is obtained by differentiating the equation (3) with respect to time, when there are no redundant joints in the robot. The equation which represents the robot end velocity by the joint velocity is locally a linear equation without regard to a mechanical structure of the robot. However, when the redundant joints are included, a matrix of equations representing the robot end velocity by the joint velocity is non-square. Although an inverse matrix of the non-square matrix can be obtained by an approximation function, the calculation of the approximation function is complex and time-consuming. Therefore, when a simple controller having a microcomputer as a data processing unit is used, it is practically difficult to real-time control the robot.